﻿using System;
using System.Text;
using System.Web;

namespace Zeenck.Extensions
{
    public static class ConversionExtensions
    {
        public static String UrlTokenEncode(this String text)
        {
            return HttpServerUtility.UrlTokenEncode(Encoding.ASCII.GetBytes(text));
        }

        public static String UrlTokenDecode(this String text)
        {
            return Encoding.ASCII.GetString(HttpServerUtility.UrlTokenDecode(text));
        }
    }
}
